{__NOLAYOUT__}
<layout name="layoutPC" />
<div class="container" ng-controller="missionController">
  <input type="hidden" id="missionId" value="<{$mission_id}>">
  <div class="row" style="margin-top:40px;">
    <div class="col-sm-8">
      <h2 style="margin-bottom:20px;width: 90%;">{{ mission.mission_name }}</h2>
      <span class="dateline">{{ getTimePast(mission.publish_time) }}</span>
      <div ng-switch="hasFavored">
        <a href="javascript:void(0)" class="side-col" style="right:8.333%;top:15px;" ng-switch-when="1" ng-click="favMission()">
          <img style="right:100px;height:58px;width:56px" src="__PUBLIC__/static/pc/img/icon_fav.png">
          <br>
          <p>收藏</p>
        </a>
        <a href="javascript:void(0)" class="side-col" style="right:8.333%;top:15px;" ng-switch-when="2" ng-click="delFavMission()">
        <img style="right:100px;height:58px;width:56px" src="__PUBLIC__/static/pc/img/u14.png">
        <br>
        <p>取消收藏</p>
      </a>
      </div>
      <div class="row" style="margin-top: 15px;">
        <div class="col-sm-4" ng-switch="mission.isReceiveMission">
          <button ng-switch-when="1" class="btn-blue-line btn-lg btn-block" type="button" ng-click="showModal()" ng-disabled="mission.is_self == 2">一键接活</button>
          <button ng-switch-when="2" class="btn-blue-line btn-lg btn-block" disabled="disabled" type="button">已申请</button>
          <button ng-switch-when="3" class="btn-blue-line btn-lg btn-block" disabled="disabled" type="button">已接活</button>
          <button ng-switch-default class="btn-blue-line btn-lg btn-block" disabled="disabled" type="button">已结束</button>
        </div>
        <div class="col-sm-4">
          <button class="btn-blue-line btn-lg btn-block" type="button" data-toggle="modal" data-target="#phoneModal">电话联系</button>
        </div>
        <div class="col-sm-12 padding-0" id="price" >
          <span class="price-tag">{{ mission.salary || '面谈' }}</span>
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-2 title title-left" style="font-size: 20px;">
            岗位需求
        </div>
        <div class="col-sm-10 content" style="font-size: 20px;">
            {{ mission.jobs }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-2 title title-left" style="font-size: 20px;">
            工作时限
        </div>
        <div class="col-sm-10 content" style="font-size: 20px;">
            {{ mission.durationMeaning }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-2 title title-left" style="font-size: 20px;">
            工作地点
        </div>
        <div class="col-sm-10 content" style="font-size: 20px;">
            {{ mission.location }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-2 title title-left" style="font-size: 20px;">
            详细描述
        </div>
        <div class="col-sm-10 content mission-desc" style="font-size: 20px;">
            {{ mission.description }}
        </div>
      </div>
      <!-- JiaThis Button BEGIN -->
      <div class="jiathis_style" style=";overflow:hidden;float:right;">
        <span class="jiathis_txt" style="font-size:18px;">分享到：</span>
        <a class="jiathis_button_weixin">微信</a>
        <!-- <a href="http://www.jiathis.com/share?uid=2017001" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a> -->
      </div>
      <!-- JiaThis Button END -->

    </div>
    <if condition="isset($_SESSION['loginUser']) eq true">
      <div class="col-sm-4 publisher">
        <h3>发布者</h3>
        <input type="hidden" id="userId" value="{{ publisher_id }}">
        <p id="pub-info">
          <a href="<{:U('FetcherInfo/indexPC')}>?user_id={{ publisher_id }}" id="pub-name">{{ publisher_name }}
          </a>
          <span ng-show="publisher.trust==2" style="margin-right:1%;" class="believe">信</span>
          <span class="lvl lvl-left">甲.V{{ publisher.level_j }}</span>
        </p> 
        <a href="<{:U('Message/sendorreceivemessagepc')}>/publisher_id/{{ publisher_id }}/publisher_name/{{ publisher_name }}" class="side-col" style="right:35px;top:20px;">
          <img style="right:100px;height:44px;width:44px;" src="__PUBLIC__/static/pc/img/u16.png">
          <br>
          <p>留言</p>
        </a>
        <p class="title-sm">代表机构</p>
        <p style="font-size:20px;">{{ publisher.agent_j || '暂无' }}</p>
        <p class="title-sm">机构简介</p>
        <p style="font-size:20px;">{{ publisher.agent_j_desc || '暂无' }}</p>
        <p class="title-sm">信任圈子</p>
        <div class="trust-list" style="padding-bottom:100px;">
          <div class="trust-member" ng-switch="trustShow">
            <div ng-switch-when="2">
              <a href="<{:U('FetcherInfo/indexPC')}>?user_id={{ user.truster_id }}" ng-repeat="user in trustInfo">
                <img ng-src="__UPLOAD__/{{ user.image_url }}" />
                <br>
                <p style="text-align:center;">{{ user.user_name }}</p>
              </a>
            </div>
            <span ng-switch-when="1">还没有任何人信任你</span>
          </div>
          <!--<div class="trust-desc">-->
            <!--<p>信任圈子通常为真实生活中互相了解的朋友，相信他的工作能力，为他点赞！能够起到互相推广的效果</p>-->
          <!--</div>-->
          <div class="btn-like" style="right:35px;bottom:110px;" ng-switch="hasTrusted">
            <a href="javascript:void(0)" style="text-decoration:none;" ng-switch-when="1" ng-click="trust()">
              <img src="__PUBLIC__/static/pc/img/u34.png">
              <span>{{ trustNum }}</span>
            </a>
            <a href="javascript:void(0)" style="text-decoration:none;" ng-switch-when="2" ng-click="delTrust()">
              <img src="__PUBLIC__/static/pc/img/icon_trusted.png" style="width: 30px;">
              <span>{{ trustNum }}</span>
            </a>
          </div>
        </div> 
        <a class="hp-report" href="javascript:void(0)" style="left:390px;bottom:60px;" ng-click="getReportModal()">
            <p style="text-align:right;">举报</p>
          </a>
      </div>
    <else />
      <div class="col-sm-4 publisher"  style="height:300px;text-align:cneter;padding-top:145px;">
        想要查看更多信息请<a href="<{:U('Login/loginPC')}>">登录</a>，没有账号请<a href="<{:U('Register/registerPC')}>">注册</a>
      </div>
  </if>
  </div>
  <!-- 接活提示框 -->
  <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="msgModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="msgModalLabel"></h4>
        </div>
        <div class="modal-body">
          <h4 class="text-tips">留言</h4>
          <textarea rows="4" id="fetchContent" class="form-control" placeholder="150字以内"></textarea>
        </div>
        <div class="modal-footer center">
          <button type="button" ng-click="fetchMission()" class="btn btn-main">发送</button>
        </div>
      </div>
    </div>
  </div>


    <div class="modal fade" id="phoneModal" tabindex="-1" role="dialog" aria-labelledby="msgModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" >{{ publisher_name }}</h4>
                </div>
                <div class="modal-body">
                    <h3 class="text-tips">电话号码</h3>
                    <h3>{{phone}}</h3>
                </div>
            </div>
        </div>
    </div>
    
    <div class="modal fade" id="reportModal" tabindex="-1" role="dialog" aria-labelledby="msgModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" >{{ publisher_name }}</h4>
          </div>
          <div class="modal-body">
            <h4 class="text-tips">举报内容</h4>
            <textarea rows="4" id="reportContent" class="form-control" placeholder="150字以内"></textarea>
          </div>
          <div class="modal-footer center">
            <button type="button" ng-click="report()"  class="btn btn-main">发送</button>
          </div>
        </div>
      </div>

    </div>
</div>
<script type="text/javascript">
var url = window.location.href.replace('indexpc','index')
var title = $('h2').html;
// var jiathis_config = {};
var jiathis_config = {
  data_track_clickback:'true', 
  url: url, 
  title: title
  // summary:"分享的文本摘要" 
} 
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1" charset="utf-8"></script>